package com.gitee.kamismile.stone.basic.data.domain.sysRole.service;

import com.gitee.kamismile.stone.basic.data.domain.sysRes.repository.entity.SysResources;
import com.gitee.kamismile.stone.basic.data.domain.sysRole.repository.entity.SysRole;
import com.gitee.kamismile.stone.basic.data.domain.sysRole.repository.entity.SysRoleResources;
import org.springframework.data.domain.Page;
import org.springframework.data.relational.core.query.Criteria;
import reactor.core.publisher.Mono;

public interface ISysRoleDomainService {

    public Mono<SysRole> saveOrUpdate(SysRole sysRole);

    public Mono<Void> deleteSysRoleById(Integer nSysRoleId);

    public Mono<Page<SysRole>> findRolePage(int page, int size,
                                                Criteria criteria);

    public Mono<SysRole> findAndCheckRoleById(Integer nSysRoleId, Integer nTenantId);


    public Mono<SysRoleResources> findAndCheckRoleResById(Integer nSysRoleResourcesId, Integer nTenantId);


    public Mono<SysRoleResources> saveOrUpdate(SysRoleResources sysRole);


    public Mono<Void> deleteSysRoleResById(Integer nSysRoleResourcesId, Integer nTenantId);


    public Mono<Page<SysRoleResources>> findRoleResPage(int page, int size,
                                            Criteria criteria);
}
